EMT Practice Test

1. Question Content...


Question List

Question1: A button that is rendered as an HTML input element with the type attribute set to submit, reset, or image, depending on the <apex:commandButton> tag's specified values. The button executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action.
An <apex:commandButton> component must always be a child of an <apex:form> component.
See also: <apex:commandLink>

Question2: An HTML table that is defined by iterating over a set of data, displaying information about one item of data per row. The body of the <apex:dataTable> contains one or more column components that specify what information should be displayed for each item of data. The data set can include up to 1,000 items.

Question3: A data series to be rendered as connected points in a Visualforce chart. At a minimum you must specify the fields in the data collection to use as X and Y values for each point, as well as the X and Y axes to scale against.
Note: This component must be enclosed within an <apex:chart> component. You can have multiple
<apex:barSeries> and <apex:lineSeries> components in a single chart.

Question4: What are the two types of logs?

Question5: What is the maximum size of a SOAP request or response?

Question6: What language is Apex similar to?

Question7: This tag acts as a placeholder for your dynamic Apex components. It has one required parameter- component Value-which accepts the name of an Apex method that returns a dynamic component.
The following Visualforce components do not have dynamic Apex representations:
<apex:actionRegion>
<apex:attribute>
<apex:component>
<apex:componentBody>
<apex:composition>
<apex:define>
<apex:dynamicComponent>
<apex:flash>
<apex:inputFile>
<apex:include>
<apex:insert>
<apex:pageMessage>
<apex:pageMessages>
<apex:variable>
<apex:vote>
Any non-<apex:> tag, like <chatter:>, <flow:>, <ideas:>, <knowledge:>, <messaging:>, or <site:>

Question8: The standard detail page for a particular object, as defined by the associated page layout for the object in Setup. This component includes attributes for including or excluding the associated related lists, related list hover links, and title bar that appear in the standard Salesforce application interface.

Question9: A link that executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action. An
<apex:commandLink> component must always be a child of an <apex:form> component.
To add request parameters to an <apex:commandLink>, use nested <apex:param> components.

Question10: What is the default return type of a sosl statement?

Question11: A template component that provides content for an <apex:insert> component defined in a Visualforce template page.
See also: <apex:composition>, <apex:insert>

Question12: What is the list of steps to match regular expressions using the Pattern and Matcher classes?

Question13: Under what circumstances is it appropriate for a developer to add functionality to their application via the SOAP API? (Select all that apply)

Question14: The system method, System.runAs(), lets you write test methods that change user contexts to either an existing user or a new user.

Question15: What name identifies datatypes such as Integer, Boolean, String and Enum in Salesforce?

Question16: This tag allows a custom component author to define a location where a user can insert content into the custom component. This is especially useful for generating custom iteration components. This component is valid only within an <apex:component> tag, and only a single definition per custom component is allowed.

Question17: A link to a URL. This component is rendered in HTML as an anchor tag with an href attribute. Like its HTML equivalent, the body of an <apex:outputLink> is the text or image that displays as the link. To add query string parameters to a link, use nested <apex:param> components.

Question18: What statements are used to retrieve records from an sObject in the Force.com database?

Question19: What components of apex are available to improve the processing of data in Salesforce?

Question20: What are all the datatypes that Salesforce supports?

Question21: What is the this keyword used to represent?

Question22: An HTML input element of type text. Use this component to get user input for a controller method that does not correspond to a field on a Salesforce object.
This component does not use Salesforce styling. Also, since it does not correspond to a field, or any other data on an object, custom code is required to use the value the user inputs.

Question23: A component that inserts a second Visualforce page into the current page. The entire page subtree is injected into the Visualforce DOM at the point of reference and the scope of the included page is maintained.
If content should be stripped from the included page, use the <apex:composition> component instead.

Question24: Which of the following code will u use to instantiate a map called numbers that has integers as keys and strings as values?
Map<SLrng, :nLeger> numbers = new Map<String, Integer>;

Map<ThLeyer, SLring> numbers = new Map<Integer, String>;

Map<nLeger> numbers = new Map<String>;

Map<Slring> numbers = new Map<Integer>;

Question25: How should one prevent soql injection when using dynamic soql?

Question26: Which of the following guidelines are used for creating custom Web Services? (Select all that apply.) webservice methods must be static.

webservice methods cannot be overloaded.

A system-defined enum can be used anywhere in a webservice method.

All classes that contain methods defined with the webService keyword must be declared as private.

Question27: What is a class?

Question28: What email addresses can emails be sent to out of Salesforce?

Question29: Can apex code be created directly in the production environment?

Question30: Which fields are returned by sosl by default?

Question31: A placeholder for content that is rendered in a specific part of the parent component, such as the header or footer of an <apex:dataTable>.
An <apex:facet> component can only exist in the body of a parent component if the parent supports facets.
The name of the facet component must match one of the pre-defined facet names on the parent component. This name determines where the content of the facet component is rendered. Consequently, the order in which a facet component is defined within the body of a parent component does not affect the appearence of the parent component.
See <apex:dataTable> for an example of facets.
Note: Although you can't represent an <apex:facet> directly in Apex, you can specify it on a dynamic component that has the facet. For example:

Question32: An ordered or unordered list of values that is defined by iterating over a set of data. The body of the
<apex:dataList> component specifies how a single item should appear in the list. The data set can include up to 1,000 items.

Question33: What are the three ways to run unit tests?

Question34: A Visualforce controller is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce markup, such as when a user clicks a button or link.
Controllers also provide access to the data that should be displayed in a page, and can modify component behavior.

Question35: An area of a Visualforce page that demarcates which components should be processed by the Force.com server when an AJAX request is generated. Only the components in the body of the <apex:actionRegion> are processed by the server, thereby increasing the performance of the page.

Question36: Which syntax should you use to create a new public class named MyNewClass?
Public class MyNewClass {}

Class public MyNewClass {}

Class MyNewClass {} public

MyNewClass public {} class

Question37: What can the Force.com IDE be used to create?

Question38: List the HTTP classes available in Salesforce?

Question39: What does each email service have for which users can send messages?

Question40: Defines an axis for a chart. Use this to set the units, scale, labeling, and other visual options for the axis.
You can define up to four axes for a single chart, one for each edge.
Note: This component must be enclosed within an <apex:chart> component. This component is only applicable to bar and line charts.

Question41: What are the four ways to deploy Apex code?

Question42: All messages that were generated for all components on the current page. If an <apex:message> or
<apex:messages> component is not included in a page, most warning and error messages are only shown in the debug log.

Question43: What are all the datatypes that Salesforce supports?

Question44: How can the default profile under which Webservices execute be changed?

Question45: What annotation can be used with Web Services to allow unrestricted queries when no DML operations are necessary?

Question46: The list view picklist for an object, including its associated list of records for the currently selected view. In standard Salesforce applications this component is displayed on the main tab for a particular object. This component has additional attributes that can be specified, such as the height and rows per page, as compared to <apex:listView>.
Note: When an <apex:enhancedList> is rerendered through another component's rerender attribute, the
<apex:enhancedList> must be inside of an <apex:outputPanel> component that has its layout attribute set to "block". The <apex:enhancedList> component is not allowed on pages that have the attribute showHeader set to false. You can only have five <apex:enhancedList> components on a single page. Ext JS versions less than 3 should not be included on pages that use this component.

Question47: Total number of test classes that can be queued per a 24-hour period (as of Spring'13): The greater of 500 or 10 multiplied by the number of test classes in the organization

Question48: Which of the following statements are used to repeatedly execute a block of code until the exit condition is met?
do-while loops

if statements

for loops

if-Lhen statements

Question49: What statements are used to retrieve records from an sObject in the Force.com database?

Question50: Under what profile do Webservice methods execute by default?

Question51: Which keywords do developers use to handle exceptions in Apex?

Question52: What components must be deployed manually to the production environment?

Question53: What does Apex provide to support programmatic control of the workflow?

Question54: If the error message contains HTML markup, the escaped markup displays as text and isn't rendered in the user interface. (Select all that apply)

Question55: An HTML input element of type password. Use this component to get user input for a controller method that does not correspond to a field on a Salesforce object, for a value that is masked as the user types.

Question56: A read-only display of a label and value for a field on a Salesforce object. An <apex:outputField> component respects the attributes of the associated field, including how it should be displayed to the user.
For example, if the specified <apex:outputField> component is a currency field, the appropriate currency symbol is displayed. Likewise, if the <apex:outputField> component is a lookup field or URL, the value of the field is displayed as a link.
Note that if custom help is defined for the field in Setup, the field must be a child of an <apex:pageBlock> or <apex:pageBlockSectionItem>, and the Salesforce page header must be displayed for the custom help to appear on your Visualforce page. To override the display of custom help, use the <apex:outputField> in the body of an <apex:pageBlockSectionItem>.
The Rich Text Area data type can only be used with this component on pages running Salesforce.com API versions greater than 18.0.

Question57: What types of sharing are available to developers to share records?

Question58: Defines a chart legend. This component offers additional configuration options beyond the defaults used by the legend attribute of the <apex:chart> component.
Note: This component must be enclosed within an <apex:chart> component.

Question59: Which trigger context variable allows you to modify field values before they are written to the database in the before trigger?

Question60: What two methods of customization are available to create applications in salesforce?

Question61: What are the types of exception classes developers can choose between in Apex?

Question62: Which keywords should u specify to define a constant?
static and exception

static and final

static and private

exception and final

Question63: What term indicates that Salesforce is a platform which allows clients to share hardware, storage and other infrastructure?

Question64: A single column in a table. An <apex:column> component must always be a child of an <apex:dataTable> or <apex:pageBlockTable> component.
Note that if you specify an sObject field as the value attribute for an <apex:column>, the associated label for that field is used as the column header by default. To override this behavior, use the headerValue attribute on the column, or the column's header facet.

Question65: A component that displays the status of an AJAX update request. An AJAX request can either be in progress or complete.

Question66: A Visualforce chart. Defines general characteristics of the chart, including size and data binding.

Question67: What are access modifiers used to implement?

Question68: A set of content that is grouped together, rendered with an HTML <span> tag, <div> tag, or neither. Use an
<apex:outputPanel> to group components together for AJAX refreshes.

Question69: What interface does the Apex email handler implement to setup and inbound email service?

Question70: Which form of dml operation allows execution to occur with subsequent records even if an error occurs with a single record?

Question71: Which invocation method occurs when triggers are called by the Force.com platform during the save process?
Explicit invocation

Implicit invocation

Explicit invocation using anonymous blocks

External API invocation

Question72: What two methods of customization are available to create applications in salesforce?

Question73: A component that creates an inline frame within a Visualforce page. A frame allows you to keep some information visible while other information is scrolled or replaced.

Question74: Which of the following are collection data types Identify the classes that u can use to make HTTP or RESTful callouts.
HTTP class

HTTPRequesL class

HTTPServerRequest. class

HTTPRsponse class

HTTPServerResponse class

Question75: What keyword is used to create custom Web Services from an apex method?

Question76: Defines tooltips which appear on mouse over of data series elements. This component offers more configuration options than the default tooltips displayed by setting the tips attribute of a data series component to true.
Note: This component must be enclosed by a data series component (<apex:barSeries>,
<apex:lineSeries>, or <apex:pieSeries>).

Question77: A label for an input or output field. Use this component to provide a label for a controller method that does not correspond to a field on a Salesforce object.

Question78: Apex code can be initiated in what ways? (Select all that apply)

Question79: What two forms of dml operations can be used in apex?

Question80: A text area input element. Use this component to get user input for a controller method that does not correspond to a field on a Salesforce object, for a value that requires a text area.

Question81: In what code is the webservice keyword not allowed to be used?

Question82: What datatype is used for standard or custom objects that store record data?

Question83: An HTML input element of type hidden, that is, an input element that is invisible to the user. Use this component to pass variables from page to page.

Question84: Which statement is true about an Apex class?
A class cannot be disabled for profiles.

An inner class can be nested at multiple levels.

Static methods can only be declared in a top-level class definition.

The default access modifier for methods in a class is public.

Question85: How does the Email service process inbound emails?

Question86: A single piece of data in an <apex:pageBlockSection> that takes up one column in one row. An
<apex:pageBlockSectionItem> component can include up to two child components. If no content is specified, the column is rendered as an empty space. If one child component is specified, the content spans both cells of the column. If two child components are specified, the content of the first is rendered in the left, "label" cell of the column, while the content of the second is rendered in the right, "data" cell of the column.
Note that if you include an <apex:outputField> or an <apex:inputField> component in an
<apex:pageBlockSectionItem>, these components do not display with their label or custom help text as they do when they are children of an <apex:pageBlockSectionItem>. Also note that
<apex:pageBlockSectionItem> components cannot be rerendered; rerender the child components instead.

Question87: An HTML input element for a value that corresponds to a field on a Salesforce object. The
<apex:inputField> component respects the attributes of the associated field, including whether the field is required or unique, and the user interface widget to display to get input from the user. For example, if the specified <apex:inputField> component is a date field, a calendar input widget is displayed. When used in an <apex:pageBlockSection>, <apex:inputField> tags always display with their corresponding output label.
Note that if custom help is defined for the field in Setup, the field must be a child of an <apex:pageBlock> or <apex:pageBlockSectionItem>, and the Salesforce page header must be displayed for the custom help to appear on your Visualforce page. To override the display of custom help, use the <apex:inputField> in the body of an <apex:pageBlockSectionItem>.
Consider the following when using JavaScript events with this tag:
For lookup fields, mouse events fire on both the text box and graphic icon For multi-select picklists, all events fire, but the DOM ID is suffixed with _unselected for the left box,
_selected for the right box, and _right_arrow and _left_arrow for the graphic icons For rich text areas, no events fire.

Question88: The method used to create an object out of a class definition is called a:

Question89: An HTML input element of type checkbox. Use this component to get user input for a controller method that does not correspond to a field on a Salesforce object.

Question90: Which access modifier should u specify for a class containing the webService keword?
Public

Private

Protected

Global

Question91: Defines how labels are displayed. Depending on what component wraps it, <apex:chartLabel> gives you options for affecting labels for bar and line series labels, pie chart segments, and axes labels.
Note: This component must be enclosed by a data series component (<apex:barSeries>,
<apex:lineSeries>, or <apex:pieSeries>) or an <apex:axis> component.

Question92: Which of the following statements are true about components of dynamic Apex?
Schema describe is a way to program matically learn about the metadata of your data model within

Apex.
Dynamic SOQL refers to the creation of a SOQL string before runtime within an Apex script,

In dynamic SQQL, you use Sring.escapeSinqIeQuoLes (sLrng)to prevent SQQL injection.

You can use dynamic SOSL to create a tree structure of all the objects and fields in your schema

browser.

Question93: How are static methods and attributes access?

Question94: A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by the server when a particular event occurs, such as a button click or mouseover.
See also: <apex:actionFunction>.

Question95: What is the this keyword used to represent?

Question96: What are two ways to invoke a custom web service?

Question97: A graphic image, rendered with the HTML <img> tag.

Question98: What types of sharing are available to developers to share records?

Question99: Which trigger context variable cannot be deleted?

Question100: Identify the differences between Apex and the other programming languages. (Select all that apply.) Apex runs in a multitenant environment.

Apex performs uncontrolled program invocations.

Apex is case-insensitive.

Apex can be processed on any platform.

Question101: What three classes along with the Messaging.InboundEmailHandler are used to handle inbound email messages in Salesforce?

Question102: Which environments can developers write code? (Select all that apply.)
Developer edition production org

Enterprise edition production org

Enterprise edition sandbox org

Professional edition sandbox org

Question103: What are two key tools to debug code in Salesforce?

Question104: Which statement is true about an Apex class?
A class cannot be disabled for profiles.

An inner class can be nested at multiple levels.

Static methods can only be declared in a top-level class definition.

The default access modifier for methods in a class is public.

Question105: The Log a Call publisher lets support agents who use Case Feed create logs for customer calls. This component can only be used in organizations that have Case Feed, Chatter, and feed tracking on cases enabled.

Question106: An area of a page that includes content from a second template page. Template pages are Visualforce pages that include one or more <apex:insert> components. The <apex:composition> component names the associated template, and provides body for the template's <apex:insert> components with matching
<apex:define> components. Any content outside of an <apex:composition> component is not rendered.

Question107: What two ways can classes be created in salesforce?

Question108: What two ways are available to customize and create applications in salesforce?

Question109: A template component that declares a named area that must be defined by an <apex:define> component in another Visualforce page. Use this component with the <apex:composition> and <apex:define> components to share data between multiple pages.

Question110: What is the total number of messages that all email services put together can process in a day? (Answer)

Question111: What is the size of the batches in which triggers execute?

Question112: A section of data within an <apex:pageBlock> component, similar to a section in a standard Salesforce page layout definition.
An <apex:pageBlockSection> component consists of one or more columns, each of which spans two cells:
one for a field's label, and one for its value. Each component found in the body of an
<apex:pageBlockSection> is placed into the next cell in a row until the number of columns is reached. At that point, the next component wraps to the next row and is placed in the first cell.
To add a field from a Salesforce object to an <apex:pageBlockSection>, use an <apex:inputField> or
<apex:outputField> component. Each of these components automatically displays with the field's associated label. To add fields for variables or methods that are not based on Salesforce object fields, or to customize the format of Salesforce object field labels, use an <apex:pageBlockSectionItem> component.
Each <apex:inputField>, <apex:outputField>, or <apex:pageBlockSectionItem> component spans both cells of a single column.

Question113: A Flash movie, rendered with the HTML object and embed tags.

Question114: The markup defines the user interface components that should be included on the page, and the way they should appear.

Question115: How do you call Web Services from external sources?

Question116: Each setSavepoint() and rollback statement counts against the total number of DML statements.

Question117: What does Apex use to record disruptions in code execution?

Question118: What is the maximum size of a SOAP request or response regulated by?

Question119: A single Visualforce page. All pages must be wrapped inside a single page component tag.

Question120: The System.runAs() functionality can be used to test and verify proper data sharing and data access.
However, System.runAs() does NOT validate CRUD or Field Level Security permissions.

Question121: A link to a JavaScript library that can be used in the Visualforce page. When specified, this component injects a script reference into the head element of the generated HTML page.
For performance reasons, you may simply want to use a JavaScript tag before your closing <apex:page> tag, rather than this component.

Question122: An area of a page that uses styling similar to the appearance of a Salesforce detail page, but without any default content.

Question123: Which trigger context variable is not saved in the after trigger and causes an exception to be thrown?

Question124: What trigger method is used to help prevent completion of a DML event?

Question125: What does Apex use to record disruptions in code execution?

Question126: A definition of an attribute on a custom component. The attribute tag can only be a child of a component tag.
Note that you cannot define attributes with names like id or rendered. These attributes are automatically created for all custom component definitions.

Question127: Which of the following statements identifies the block of code that can handle a particular exception?
catch

finally

try

throw

Question128: To leverage functionality of Standard Controllers, while simultaneously adding custom logic, you must write a custom class that extends the standard controller. You notify the Visualforce page of your customizations via the "extensions" attribute of the <apex:page> tag.

Question129: A custom Visualforce component. All custom component definitions must be wrapped inside a single
<apex:component> tag.

Question130: What trigger method is used to correlate IDI-to-sObject maps?

Question131: A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request. An <apex:actionFunction> component must be a child of an <apex:form> component.

Question132: A data series to be rendered as bars in a Visualforce chart. At a minimum you must specify the fields in the data collection to use as X and Y values for each bar, as well as the X and Y axes to scale against.
Note: This component must be enclosed within an <apex:chart> component. You can have multiple
<apex:barSeries> and <apex:lineSeries> components in a single chart.

Question133: Displays text on a Visualforce page. You can customize the appearance of <apex:outputText> using CSS styles, in which case the generated text is wrapped in an HTML <span> tag. You can also escape the rendered text if it contains sensitive HTML and XML characters. This component does take localization into account.
Use with nested param tags to format the text values, where {n} corresponds to the n-th nested param tag.
The value attribute supports the same syntax as the MessageFormat class in Java. See the MessageFormat class JavaDocs for more information.
Warning:Encrypted custom fields that are embedded in the <apex:outputText> component display in clear text. The <apex:outputText> component doesn't respect the View Encrypted Data permission for users. To prevent showing sensitive information to unauthorized users, use the <apex:outputField> tag instead.

Question134: A section of a Visualforce page that allows users to enter input and then submit it with an
<apex:commandButton> or <apex:commandLink>. The body of the form determines the data that is displayed and the way it is processed. It's a best practice to verify that pages and custom components use at most one <apex:form> tag.
As of API version 18.0, this tag can't be a child component of <apex:repeat>.

Question135: For example, if you use the standard Accounts controller, clicking a Save button in a Visualforce page results in the same behavior as clicking Save on a standard Account edit page. The same behavior holds true for Custom objects.

Question136: Which type of for loops are defined with the following syntax?
FOR(initstmt; exit_condition; increment stmt){
codeblock
}
Traditional for loops

List iteration for loops

Set iteration for loops

SOQLforloops

Question137: What determines how the email service responds when an attempt to access the email service fails?

Question138: What are some RESTful service callout HTTP verbs?

Question139: The email publisher lets support agents who use Case Feed compose and send email messages to customers. You can customize this publisher to support email templates and attachments. This component can only be used in organizations that have Case Feed and Email-to-Case enabled. Ext JS versions less than 3 should not be included on pages that use this component.

Question140: A message for a specific component, such as a warning or error. If an <apex:message> or
<apex:messages> component is not included in a page, most warning and error messages are only shown in the debug log.

Question141: What code is the webservice keyword not allowed to be used?

Question142: A component that creates an input field to upload a file.
Note: The maximum file size that can be uploaded via Visualforce is 10 MB.

Question143: What are the five types of Apex procedural loops?

Question144: How are programmatic cusomizations done in Salesforce?

Question145: Which trigger context variable cannot be deleted?

Question146: Which trigger context variable allows you to modify field values before they are written to the database in the before trigger?

Question147: How should one prevent soql injection when using dynamic soql?

Question148: The list view picklist for an object, including its associated list of records for the currently selected view. In standard Salesforce applications this component is displayed on the main tab for a particular object.
See also: <apex:enhancedList>.

Question149: This component provides inline editing support to <apex:outputField> and various container components.
In order to support inline editing, this component must also be within an <apex:form> tag.
The <apex:inlineEditSupport> component can only be a descendant of the following tags:
<apex:dataList>
<apex:dataTable>
<apex:form>
<apex:outputField>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockTable>
<apex:repeat>
See also: the inlineEdit attribute of <apex:detail>

Question150: A set of buttons that are styled like standard Salesforce buttons. This component must be a child component of an <apex:pageBlock>.
Note that it is not necessary for the buttons themselves to be direct children of the
<apex:pageBlockButtons> component-buttons that are located at any level within an
<apex:pageBlockButtons> component are styled appropriately.

Question151: Which of the following are collection data types?
String

Map

List

Date

Set

Number

Question152: A timer that sends an AJAX update request to the server according to a time interval that you specify. The update request can then result in a full or partial page update. You should avoid using this component with enhanced lists.

Question153: What are the stages of an application development process?

Question154: By referring to a page in this way, the platform recognizes that this controller or controller extension is dependent on the existence of the specified page and will prevent the page from being deleted while the controller or extension exists.